<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>真实dom和虚拟dom的区别</title>
</head>

<body>
 
  <ul></ul>

  <script>

    console.time('start')
    const dom = document.querySelector('ul')
    let str = ''
    for (let index = 0; index < 1000; index++) {
      str += `<li>${index}</li>`
    }
    dom.innerHTML = str
    console.timeEnd('start')

  </script>

</body>

</html>